using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq.Mapping;
using System.Data.Linq;
using MimeCloud.AssetManagement.Business.Interface;

namespace MimeCloud.AssetManagement.DataProvider.Sql.Entities
{
    [Table(Name="T_MetaValue")]
    public class MetaValue : IMetaValue
    {
        public MetaValue()
        {
            _Language = default(EntityRef<Language>);
        }

        [Column(Name="Description_NVC")]
        public string Description { get; set; }
        
        [Column(Name="Enabled_BIT")]
        public bool Enabled { get; set; }

        [Column(Name="MetaValue_IDPK",IsPrimaryKey=true,IsDbGenerated=true)]
        public int ID { get; set; }

        [Column(Name="Value_NVC")]
        public string Value { get; set; }

        
        [Association(IsForeignKey=true,ThisKey="LanguageID",OtherKey="ID",Storage="_Language")]
        private Language LanguageE { get { return _Language.Entity; } set { _Language.Entity = value; } }
        public ILanguage Language { get { return _Language.Entity; } set { _Language.Entity = value as Language; } }
        private EntityRef<Language> _Language;

        [Column(Name="LanguageID_FK")]
        public short LanguageID { get; set; }
    }
}
